<h1>Missions</h1>

<table id="msn_table">
  <tr>
	<th>Name</th>
	<th>Type</th>
	<th>Comms</th>
	<th>Description</th>
	<th>Commander</th>
	<th>Start Time</th>
	<th>Stop Time</th>
	<th>Author</th>
  </tr>

<% for mission in @missions %>
  <tr>
  	<td><%= link_to mission.name, :action => 'show', :id => mission %></td>
	<td><%= mission.mission_type.name %></td>
	<td><%= mission.comms_type.name %></td>
	<td><%= mission.description %></td>
	<td>TODO</td>
	<td><%= mission.start_date %></td>
	<td><%= mission.duration.name %></td>
	<td><%= Member.find(mission.member_id).name if mission.member_id > 0 %></td>
	<td><%= link_to 'delete', :action => 'destroy', :id => mission %></td>
  </tr>

<% end %>
</table>
<br />

<%= link_to 'New mission', :action => 'new' %>
